<?php
/**
 * Created by PhpStorm.
 * User: sosyuki
 * Date: 2018/5/30
 * Time: 11:24
 */

namespace Drupal\distribution\MetadataController;


use EntityDefaultMetadataController;

class DistributionApplyMetadataController extends EntityDefaultMetadataController {

  public function entityPropertyInfo() {
    $info = parent::entityPropertyInfo();
    $properties = &$info[$this->type]['properties'];

    $properties['user'] = [
      'label' => t('申请人'),
      'type' => 'user',
      'schema field' => 'uid',
      'description' => t('用户.'),
    ];
    $properties['op_user'] = [
      'label' => t('最近操作人员'),
      'type' => 'user',
      'schema field' => 'op_uid',
      'description' => t('最近操作人员.'),
    ];

    $properties['created'] = [
      'label' => t('申请时间'),
      'type' => 'date',
      'schema field' => 'created',
      'description' => t('申请时间.'),
    ];
    $properties['changed'] = [
      'label' => t('最近变更时间'),
      'type' => 'date',
      'schema field' => 'changed',
      'description' => t('最近变更时间.'),
    ];
    return $info;
  }
}
